<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta name="Generator" content="68ECSHOP v4_2">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<title>用户中心_淘嘟嘟</title>
		<link rel="stylesheet" type="text/css" href="__CSS__/home/common.css" />
		<link rel="stylesheet" type="text/css" href="__CSS__/home/passport.css" />
		<script src="__JQ__" type="text/javascript" charset="utf-8"></script>
		<script src="__JS__/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" src="__JS__/jquery.form.js"></script>
        <script type="text/javascript" src="__JS__/layer/layer.js"></script>
        <script type="text/javascript" src="__JS__/tips/toastr.min.js"></script>
        <script type="text/javascript" src="__JS__/jquery.layer.js"></script>
        <link rel="stylesheet" type="text/css" href="__JS__/tips/toastr.css"/>
	</head>

	<body>
		<div class="logo-r">
			<div class="logo-info-r">
				<a href="./" class="logo"></a><span class="findpw">欢迎登录</span>
				<a href="http://weibo.com/taodudu66" class="sina"></a>
				<div class="user-weixin weixin">
					<span></span>
					<div class="erweima">
						<div class="erweima-inner">
							<i><s>◇</s></i>
							<img alt="微信" src="__IMG__/home/weixin.jpg" width="130" height="130">
						</div>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
		//微信二维码
			$(".logo-info-r .weixin").hover(
				function() {
					$(".logo-info-r .erweima").show();
				},
				function() {
					$(".logo-info-r .erweima").hide();
				}
			)
		</script>
		<div class="w990" style="margin-top: 20px;">
			<div id="regist">
				<div class="register-con" style="height: 464px;">
					<div class="uc-box-reg">
						<ul class="register-tab">
							<a href="{:U('phoneReg')}"><li id="li-register-type-mobile" class="tab-item fl" register_type="mobile">手机注册<span class="bg-ff"></span></li></a>
							<li id="li-register-type-email" class="tab-item fl cur" register_type="email">邮箱注册<span class="bg-ff"></span></li>
							<li class="have-account fr">已有账号！
								<a href="{:U('index')}">登录</a>
							</li>
						</ul>
						<form action="{:U('emailReg')}" method="post" id="formUser" name="formUser" novalidate="novalidate">
							<div class="form">
								<input type="hidden" name="register_type" value="mobile">
								<div class="item">
									<input name="cemail" type="text" id="cemail" placeholder="邮箱" class="text">
									<i class="i-email"></i>
									<div> <span class="label" id="mobile_phone_notice"></span> </div>
								</div>
								<div id="o-password">
									<div class="item">
										<input name="password" type="password" id="password" placeholder="密码" class="text">
										<i class="i-pass"></i>
										<div id="pwd_notice" style="display: none;"> <span class="label" id="password_notice"></span></div>
										<div id="pwd_intensity">
											<span class="label">
												<table width="295" height="25px" border="0" cellspacing="0" cellpadding="0" style="padding: 0px 0px 10px;">
													<tbody>
														<tr align="center">
															<td width="33%" id="pwd_lower">弱</td>
															<td width="33%" id="pwd_middle">中</td>
															<td width="33%" id="pwd_high">强</td>
														</tr>
													</tbody>
												</table>
											</span>
										</div>
									</div>
									<div class="item">
										<input type="password" id="con_password" name="con_password" class="text" placeholder="确认密码">
										<i class="i-pass"></i>
										<div> <span class="label" id="conform_password_notice"></span> </div>
									</div>
								</div>
								<div class="item">
									<input id="mobile_code" class="text text-te fl" type="text" placeholder="邮箱验证码" name="mobile_code">
									<i class="i-email"></i>
									<input id="zphone" class="zphone" type="button" value="获取邮箱验证码 ">
									<div> <span id="extend_field5i" class="label"></span> </div>
								</div>
								<div class="safety">
									<input name="agreement" type="checkbox" value="1" checked="checked" class="checkbox">
									<label for="remember" class="mar-b">我已看过并接受《<a href="article.php?cat_id=-1" style="color:blue" target="_blank">用户协议</a>》</label>
								</div>
								<div class="item">
									<input name="act" type="hidden" value="register">
									<input type="hidden" name="back_act" value="user.php">
									<input type="submit" id="btn_submit" name="Submit" class="btn-img btn-regist" value="立即注册">
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<div class="blank"></div>
		</div>
		<div class="site-footer">
			<div class="footer-related">
				<div class="footer-info clearfix">
					<div class="links">
						<a href="#" target="_blank" title="郑州日报"><img src="__IMG__/home/links/01.jpg"></a>
						<a href="#" target="_blank" title="郑州晚报"><img src="__IMG__/home/links/02.jpg"></a>
						<a href="#" target="_blank" title="中原网"><img src="__IMG__/home/links/03.jpg"></a>
						<a href="#" target="_blank" title="中原地铁报"><img src="__IMG__/home/links/04.jpg"></a>
						<a href="#" target="_blank" title="社区播报"><img src="__IMG__/home/links/05.jpg"></a>
					</div>
					<div class="info-text">
						<p class="nav_bottom">
							<a href="apply_index.php">商家入驻</a><em>|</em>
							<a href="sitemaps.xml">站点地图</a><em>|</em>
							<a href="help.php">帮助中心</a><em style="display:none">|</em> ICP备案证书号:
							<a href="http://www.miibeian.gov.cn/" target="_blank">豫B2-20160162-1</a>
						</p>
						<p>
							<a href="javascript:;">© 2005-2016 淘嘟嘟 版权所有，并保留所有权利。</a>
							<a href="javascript:;">河南省电子商务产业园 </a>
							<a href="javascript:;"> Tel: 4000371775 </a>
							<a href="javascript:;"> E-mail: sever@taodudu.com </a>
						</p>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
		//密码强度验证
        $('#password').keyup(function () {
            var __th = $(this);
            if (!__th.val()) {
                Primary();
                return;
            }
            if (__th.val().length < 6) {
                Weak();
                return;
            }
            var _r = checkPassword(__th);
            if (_r < 1) {
                Primary();
                return;
            }
            if (_r > 0 && _r < 2) {
                Weak();
            } else if (_r >= 2 && _r < 4) {
                Medium();
            } else if (_r >= 4) {
                Tough();
            }
        });
        function Primary() {
            $('#pwd_lower').attr('class', '');
            $('#pwd_middle').attr('class', '');
            $('#pwd_high').attr('class', '');
        }

        function Weak() {
        	$(".label table td").attr("class","");
            $('#pwd_lower').attr('class', 'on');
        }
        function Medium() {
        	$(".label table td").attr("class","");
            $('#pwd_middle').attr('class', 'on');
        }
        function Tough() {
        	$(".label table td").attr("class","");
            $('#pwd_high').attr('class', 'on');
        }
        function checkPassword(pwdinput) {
            var maths, smalls, bigs, corps, cat, num;
            var str = $(pwdinput).val()
            var len = str.length;
            var cat = /.{16}/g
            if (len == 0) return 1;
            if (len > 16) { $(pwdinput).val(str.match(cat)[0]); }
            cat = /.*[\u4e00-\u9fa5]+.*$/
            if (cat.test(str)) {
                return -1;
            }
            cat = /\d/;
            var maths = cat.test(str);
            cat = /[a-z]/;
            var smalls = cat.test(str);
            cat = /[A-Z]/;
            var bigs = cat.test(str);
            var corps = corpses(pwdinput);
            var num = maths + smalls + bigs + corps;
            if (len < 6) { return 1; }

            if (len >= 6 && len <= 8) {
                if (num == 1) return 1;
                if (num == 2 || num == 3) return 2;
                if (num == 4) return 3;
            }
            if (len > 8 && len <= 11) {
                if (num == 1) return 2;
                if (num == 2) return 3;
                if (num == 3) return 4;
                if (num == 4) return 5;
            }
            if (len > 11) {
                if (num == 1) return 3;
                if (num == 2) return 4;
                if (num > 2) return 5;
            }
        }
        function corpses(pwdinput) {
            var cat = /./g
            var str = $(pwdinput).val();
            var sz = str.match(cat)
            for (var i = 0; i < sz.length; i++) {
                cat = /\d/;
                maths_01 = cat.test(sz[i]);
                cat = /[a-z]/;
                smalls_01 = cat.test(sz[i]);
                cat = /[A-Z]/;
                bigs_01 = cat.test(sz[i]);
                if (!maths_01 && !smalls_01 && !bigs_01) { return true; }
            }
            return false;
        }
    </script>
<script type="text/javascript">
    var passlength="密码长度不正确";
    var passcon="密码不一致"
    $(function(){
        //邮箱表
        jQuery.validator.addMethod("isZipCode", function(value, element) {
            var tel = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
            return this.optional(element) || (tel.test(value));
        }, "邮箱格式不正确");
        $("#formUser").validate({
            rules:{
                cemail : {
                    required: true,
                    isZipCode: true,
                    remote: {
	                    type: "post",
	                    url: "{:U('test')}",//处理地址 返回值 只能是true或false
	                    dataType: "json",
                        data: {
                            cemail: function() {
                                return $("#cemail").val();
                            }
                        }
	                }
                },
                password : {
                    required: true,
                    minlength: 6,
                    maxlength:20,
                },
                con_password : {
                    required: true,
                    minlength: 6,
                    maxlength:20,
                    equalTo: "#password"
                },
                agreement : {
                	required: true
                }
            },
            messages:{
            	cemail : {
                    required: "请填写邮箱",
                    isZipCode: "邮箱格式不正确",
                    remote: "邮箱已注册"
                },
                password : {
                    required: passlength,
                    minlength: passlength,
                    maxlength:passlength,
                },
                con_password : {
                    required: passlength,
                    minlength: passlength,
                    maxlength:passlength,
                    equalTo: passcon
                },
                agreement : {
                	required: function(){
                		alert("请勾选用户协议");
                	}
                }
            },
            errorPlacement: function(error, element) {
                error.appendTo(element.parent().find("div").find("span"));
            },
            success: function(label) {
                label.remove();
                $('#formUser').layer({});
            }
        });
    });
    $("#zphone").click(function() {
        if($("#cemail").attr("aria-invalid") != "true" && $("#cemail").val() != "") {
            sendMessage($(this),$('#cemail').val())
        }
    });
</script>
<script type="text/javascript">
var InterValObj; //timer变量，控制时间
var count = 5; //间隔函数，1秒执行
var curCount;//当前剩余秒数

function sendMessage(obj) {
  　curCount = count;
　　//设置button效果，开始计时
     obj.attr("disabled", "true");
     $(".zphone").addClass("on")
     obj.val(curCount + "秒");
     InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次
　　  //向后台发送处理数据
    $.ajax({
      url: weixinUrl+"/Goods/spec", //请求数据ajax地址
      data: {"phone":$('#mobile_phone').val()},
      dataType: "json",
      type: 'POST',
 	})
}

//timer处理函数
function SetRemainTime() {
            if (curCount == 0) {                
                window.clearInterval(InterValObj);//停止计时器
                $(".zphone").removeAttr("disabled");//启用按钮
                $(".zphone").val("获取验证码");
                $(".zphone").removeClass("on")
            }
            else {
                curCount--;
                $(".zphone").val(curCount + "秒");
            }
        }
</script>